package dkbta.processing.data;

import java.net.InetSocketAddress;
import java.util.Collection;

/**
 * Holds send-to information for an element. It consists of a list of addresses of other
 * computational units and a flag indicating whether the data should also be sent to the
 * db.
 * 
 * @author Uri Kanonov
 */
public class SendTo{
	/** List of addresses of other computational units */
	public final Collection<InetSocketAddress> units;

	/** A flag indicating whether the data should be sent to the DB */
	public final boolean sendToDB;

	/**
	 * Initializes the send-to info
	 * 
	 * @param units List of addresses of other computational units
	 * @param sendToDB A flag indicating whether the data should be sent to the DB
	 */
	public SendTo(Collection<InetSocketAddress> units, boolean sendToDB){
		this.units = units;
		this.sendToDB = sendToDB;
	}
}
